home *** CD-ROM | disk | FTP | other *** search
- /*
- * SystemSupportsAOCE.c
- *
- * Copyright © 1993, Apple Computer Inc.
- * All rights reserved.
- *
- * This function calls Gestalt and returns noErr if this
- * Macintosh supports the AOCE toolbox and the toolbox
- * is available. Other interesting errors are:
- * gestaltUndefSelectorErr AOCE Toolbox is not installed.
- * kOCEToolboxNotOpen AOCE Toolbox is installed,
- * but disabled (you must re-enable
- * the toolbox in the AOCE setup
- * control panel and reboot to
- * enable it.
- *
- * Note: your application will surely crash if you call any
- * AOCE function if this function returns an error.
- */
-
- #include <GestaltEqu.h>
- #include <OCE.h>
- #include <OCEErrors.h>
-
- OSErr SystemSupportsAOCE(void);
-
- /*
- * Return noErr Installed and available.
- * Return kOCEToolboxNotOpen Installed, but not available,
- * Return gestaltUndefSelectorErr Not present on this machine
- */
- OSErr
- SystemSupportsAOCE(void)
- {
- long gestaltResponse;
- OSErr status;
-
- status = Gestalt(gestaltOCEToolboxAttr, &gestaltResponse);
- if (status == noErr
- && (gestaltResponse & gestaltOCETBAvailable) == 0)
- status = kOCEToolboxNotOpen;
- return (status);
- }